/*
 * File Name:               XNumberInspector.cs
 * 
 * Description:             普通类
 * Author:                  lisiyu <576603306@qq.com>
 * Create Date:             2017/01/04
 */

using UnityEditor;
using UnityEngine;

[CustomPropertyDrawer(typeof(XNumber))]
public class XNumberInspector : PropertyDrawer
{
    public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    {
        var raw = property.FindPropertyRelative("raw");
        float value = XNumber.create_row(raw.intValue);

        value = EditorGUI.FloatField(position, property.displayName, value);

        raw.intValue = ((XNumber)value).raw;
    }
}
